package com.jm3.riscar3.core;

import com.jm3.riscar3.memory.InstructionRegister;
import com.jm3.riscar3.memory.Register;
import com.jm3.riscar3.memory.StatusRegister;

public class CPU {

	private Register A;
	private Register PC;
	private StatusRegister SR;
	private InstructionRegister IR;
	private Register[] GRegs;
	
	public CPU()
	{
		A = new Register();
		PC = new Register();
		SR = new StatusRegister();
		IR = new InstructionRegister();
		
		GRegs = new Register[8];
		for(int i = 0; i < 8; i++)
			GRegs[i] = new Register();
		
	}
	
	public Register getAcc()
	{
		return A;
	}
	
	public Register getPC()
	{
		return PC;
	}
	
	public StatusRegister getSR()
	{
		return SR;
	}
	
	public InstructionRegister getIR()
	{
		return IR;
	}
	
	public Register[] getGRegs()
	{
		return GRegs;
	}
	
	public Register getRegisterX(int registerLocation)
	{
		return GRegs[registerLocation];
	}
	
}
